package stu.aistar.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import stu.aistar.util.IdWorker;

/**
 * 本类用来演示: bean的配置类 手动注入第三方bean
 *
 * @author: success
 * @date: 2021/4/29 4:17 下午
 */
@Configuration
public class BeanConfig {
    @Bean
    public IdWorker idWorker(){
        return new IdWorker();
    }

    @Bean
    public BCryptPasswordEncoder initEncoder(){
        return new BCryptPasswordEncoder();
    }
}
